/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author jefoutta
 */
public class Main {

    public static void main (String[] args){
        
        Protoboard protoboard = new Protoboard();

        protoboard.addLogicGate("AND", "c1", 2);
        protoboard.addLogicGate("AND", "c2", 2);
        protoboard.addLogicGate("AND", "c3", 2);
        protoboard.addLogicGate("OR", "c4", 2);
        protoboard.addLogicGate("NOT", "c5", 1);
        protoboard.addLogicGate("NOT", "c6", 1);
        protoboard.addLogicGate("OR", "c7", 2);
        protoboard.addLogicGate("OR", "c8", 2);

        protoboard.addSource("a");
        protoboard.addSource("b");
        protoboard.addSource("c");
        protoboard.addSource("d");
        protoboard.addSource("f");
        protoboard.addSource("e");

        protoboard.addConnection("a","c1");
        protoboard.addConnection("b","c1");
        protoboard.addConnection("c","c2");
        protoboard.addConnection("d","c2");
        protoboard.addConnection("e","c3");
        protoboard.addConnection("f","c3");

        protoboard.addConnection("c1","c4");
        protoboard.addConnection("c2","c4");
        protoboard.addConnection("c2","c5");
        protoboard.addConnection("c5","c7");
        protoboard.addConnection("c3","c7");
        protoboard.addConnection("c4","c6");
        protoboard.addConnection("c6","c8");
        protoboard.addConnection("c7","c8");

        System.out.println(protoboard.toString());

        protoboard.findTruePaths();
        
    }
}
